package com.googlecode.mailnet.math.distribution;

import com.googlecode.mailnet.math.RandomUtil;

/**
 * @author Iskander Akishev
 */
class NormalDistribution implements Distribution {

    private final double location;
    private final double scale;

    NormalDistribution(double location, double scale) {
        this.location = location;
        this.scale = scale;
    }

    public double getValue() {
        return location + (RandomUtil.nextGaussian() * scale);
    }
}
